package behavioral_pattern.mediator_pattern.colleague;

import behavioral_pattern.mediator_pattern.mediator.IMediator;

public abstract class IDepartment {
    public final static String COMMUNICATION_TYPE_ADD_PRODUCT = "add product";
    public final static String COMMUNICATION_TYPE_ADD_PRODUCT_FINISH = "addProductFinish";
    public final static String COMMUNICATION_TYPE_PURCHASE = "purchase";
    public final static String COMMUNICATION_TYPE_PURCHASE_FINISH = "purchased";
    public final static String COMMUNICATION_TYPE_PURCHASEING = "purchaseing";

    // 商品数量
    public int productNum = 0;

    /**
     * 需要和中介进行沟通交流
     */
    public IMediator mediator;

    public abstract void setProductNum(Integer productNum);

    public IDepartment(IMediator mediator) {
        this.mediator = mediator;
    }

    /**
     * 部门内自己的工作
     */
    public abstract void work(Integer num);

    /**
     * 和其他部门的沟通交流
     */
    public abstract void communicat(String communicationType);
}
